'''测试线程.

线程任务为计时10秒,每秒改变一次状态表.

线程参数data={'times':读秒次数}
状态表self._status['status']={'msg': 字符串信息}
'''

from time import sleep

from BaseThread import BaseThread

class TestThread1(BaseThread):
  
  def _thread(self, data):
    for i in range(data['times']):
      self._status['status']['msg'] = str(i)
      print(self._status)
      sleep(1)
    return 'TestThread1._thread运行结束'
    
    
if __name__ == '__main__':
  tt = TestThread1()
  tt.start({'n': 5})